/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.persistencia.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author kenny
 */
@Embeddable
public class ClasexsalonPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "nDcnCls1Id")
    private int nDcnCls1Id;
    @Basic(optional = false)
    @Column(name = "nSlnId")
    private int nSlnId;

    public ClasexsalonPK() {
    }

    public ClasexsalonPK(int nDcnCls1Id, int nSlnId) {
        this.nDcnCls1Id = nDcnCls1Id;
        this.nSlnId = nSlnId;
    }

    public int getNDcnCls1Id() {
        return nDcnCls1Id;
    }

    public void setNDcnCls1Id(int nDcnCls1Id) {
        this.nDcnCls1Id = nDcnCls1Id;
    }

    public int getNSlnId() {
        return nSlnId;
    }

    public void setNSlnId(int nSlnId) {
        this.nSlnId = nSlnId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) nDcnCls1Id;
        hash += (int) nSlnId;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ClasexsalonPK)) {
            return false;
        }
        ClasexsalonPK other = (ClasexsalonPK) object;
        if (this.nDcnCls1Id != other.nDcnCls1Id) {
            return false;
        }
        if (this.nSlnId != other.nSlnId) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.persistencia.domain.ClasexsalonPK[ nDcnCls1Id=" + nDcnCls1Id + ", nSlnId=" + nSlnId + " ]";
    }
    
}
